<template>
  <div>
    <van-nav-bar title="练习" />
    <div class="question">
      <ul>
        <li @click="onpract(item)" v-for="(item,index) in quesList" :key="index">
          <div class="imgmain">
            <img :src="item.image" alt />
          </div>
          <p>{{item.title}}</p>
        </li>
      </ul>
    </div>
    <div class="recent">
      <p class="title">近期模考</p>
      <div class="title2">
        <span style="color:#EB6100">默认排序</span>
        <span>时间</span>
      </div>
      <img src="../assets/img/empty@2x.png" alt />
      <div>暂无安排，敬请期待</div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      quesList: [
        {
          image: require("../assets/img/exam-point.png"),
          title: "考点专练",
          path: "point"
        },
        {
          image: require("../assets/img/paper-package.png"),
          title: "套卷练习",
          path: "paperPage"
        },
        {
          image: require("../assets/img/exam.png"),
          title: "仿真模考",
          path: "exam"
        },
        {
          image: require("../assets/img/wrong-test.png"),
          title: "错题练习",
          path: "errorques"
        },
        {
          image: require("../assets/img/assess.png"),
          title: "测评记录",
          path: "assess"
        },
        {
          image: require("../assets/img/question-collocet.png"),
          title: "习题收藏"
        }
      ]
    };
  },
  methods: {
    onpract(item) {
      this.$router.push({
        name: item.path
      });
    }
  }
};
</script>


<style scoped>
.recent {
  width: 100%;
  height: 240px;
  background: #fff;
  text-align: center;
}

.recent > img {
  width: 28%;
  height: 140px;
}
.recent > .title {
  font-size: 16px;
  text-align: left;
  padding: 10px 10px;
  padding-bottom: 0px;
  color: #8c8c8c;
}
.recent > .title2 {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.recent > .title2 > span {
  padding: 0 10px;
  color: #8c8c8c;
}

.question {
  width: 95%;
  margin: 15px auto;
  height: 179px;
  background: #fff;
  border-radius: 5px;
}
.question > ul {
  display: flex;
  flex-wrap: wrap;
}
.question > ul > li {
  width: 84px;
  height: 84px;
  text-align: center;
  margin-top: 7px;
  color: #595959;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.question > ul > li > .imgmain {
  width: 40px;
  height: 40px;
  background-image: url("../assets/img/question-raido.png");
  background-size: 100% 100%;
}
.question > ul > li img {
  width: 20px;
  height: 20px;
  margin-top: 9px;
}
</style>